using AutoMapper;
using XUCore.Ddd.Domain;
using XUCore.NetCore.FreeSql.Entity;

namespace XUCore.NetCore.FreeSql.Curd
{
    /// <summary>
    /// 主键为long的Curd操作类
    /// </summary>
    /// <typeparam name="TEntity"></typeparam>
    /// <typeparam name="TUser"></typeparam>
    public class LongCurdEntity<TEntity, TUser> : CurdEntity<long, long?, TEntity, TUser>
        where TEntity : class, IEntity<long>, new()
        where TUser : class, IUser
    {
        /// <summary>
        /// 主键为long的Curd操作类
        /// </summary>
        /// <param name="db"></param>
        /// <param name="mapper"></param>
        /// <param name="user"></param>
        public LongCurdEntity(FreeSqlUnitOfWorkManager db, IMapper mapper, TUser user)
            : this(db.Orm, mapper, user)
        {
        }
        /// <summary>
        /// 主键为long的Curd操作类
        /// </summary>
        /// <param name="freeSql"></param>
        /// <param name="mapper"></param>
        /// <param name="user"></param>
        public LongCurdEntity(IFreeSql freeSql, IMapper mapper, TUser user)
            : base(freeSql, mapper, user)
        {

        }
    }
}